home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / dosutils / cutpak11.zip / README.TXT < prev    next >
Text File  |  1996-09-26  |  52KB  |  1,138 lines

  1. CLAY'S UTILITIES FOR DOS BATCH PROCESSES - LAST UPDATED 09/26/96
  2. ================================================================
  3.  
  4. Upon extracting the contents of this package you agree to the following:
  5.  
  6. The utilities included herewith are Copyright (C)1996 by Clay Ruth, who
  7. reserves all rights of ownership.  You are granted a license to use this
  8. software, free of charge, only for the purposes described below.  You are
  9. also permitted to distribute this package, IN ITS ENTIRETY, INCLUDING THIS
  10. NOTICE, WITHOUT CHARGE TO THE RECIPIENT other than reimbursement for any
  11. media on which it is distributed.
  12.  
  13. YOU MAY NOT distribute this package or any component thereof for profit,
  14. nor may you disassemble, reverse-engineer, or extract code from this software.
  15.  
  16. All software in this package has been thoroughly tested and is believed to
  17. perform as described.  It is certified to have been free of viruses, trojans
  18. and other malicious code when originally distributed by the author.  You, the
  19. user, are solely responsible for its usage, including, but not limited to,
  20. scanning for viruses and trojans it may have acquired in the distribution
  21. channels, determining its suitability for the intended use, and any and all
  22. consequences of its use.  NEITHER THE AUTHOR NOR THE DISTRIBUTOR IS RESPON-
  23. SIBLE FOR ANY DAMAGES, DIRECT OR INDIRECT, RESULTING FROM YOUR DECISION TO
  24. USE THIS SOFTWARE.
  25.  
  26. To contact the author: Clay.Ruth@WorldNet.ATT.net
  27.  
  28. The latest updates include the following:
  29.  
  30. 09/26/96 - Documentation updated for release 1.1
  31.  
  32. 09/26/96 -   TPAUSE 2.0 - Modified to provide a user-specified timeout that
  33.                           can range from 1 second to 23 hours, 59 minutes
  34.                           and 59 seconds. The original code used a fixed
  35.                           1-minute timeout, which remains the default when
  36.                           a timeout setting isn't specified. TPAUSE 2.0
  37.                           replaces the former TPAUSE, TP5, TP10, TP15 and
  38.                           TP10S commands, which provided various fixed
  39.                           timeouts.
  40.  
  41. 09/21/96 -      TSR 1.0 - New, resizeable dummy TSR to consume conventional
  42.                           or upper memory for the purpose of testing another
  43.                           DOS program's performance under conditions of
  44.                           limited memory availability. Replaces fixed-size
  45.                           dummy TSRs TSR1K, TSR5K, TSR10K and TSR50K, which
  46.                           are no longer included.
  47.  
  48. 09/13/96 -    ISRUN 1.0 - New utility to determine whether a particular DOS
  49.                           program or device driver is running (i.e., loaded
  50.                           in DOS memory) and to report the addresses of its
  51.                           code (PSP) and environment data segments.
  52.  
  53. 08/20/96 -  INIREAD 3.1 - Fixed bug that prematurely truncated settings that
  54.                           ended with a space followed by a single character.
  55.                           Fixed minor bug that caused incorrect display of a
  56.                           file content fragment instead of the file name when
  57.                           reporting that a specified section or setting was
  58.                           not found.
  59.  
  60. 06/04/96 - FILEINFO 1.3 - It can now find files in the root directory as
  61.                           well as in subdirectories.
  62.  
  63. 06/03/96 - FILEINFO 1.2 - Added compatibility with 32-bit modules as well as
  64.                           the 16-bit variety, plus better tolerance of format
  65.                           variations. Fixed bug that occasionally caused an
  66.                           item to be declared "n/a" (not available) when it
  67.                           crossed a search region boundary. Information now
  68.                           includes indication of whether the module is 16-bit
  69.                           or 32-bit.
  70.  
  71. 04/20/96 - Documentation updated for freeware distribution, release 1.0
  72.  
  73. 04/14/96 -   INIMOD 2.2 - Improved matchup logic recognizes the equivalency
  74.                           of commented and non-commented forms of the same
  75.                           setting as well as case variations, so it won't
  76.                           inadvertently add a redundant setting when the "/a"
  77.                           switch is used; also, automatically deletes any
  78.                           redundant settings it finds when the equivalent
  79.                           setting is edited.
  80.  
  81. 04/12/96 - FILEINFO 1.1 - New utility to find and report internal identifi-
  82.                           cation of Windows program modules; version 1.1
  83.                           incorporates speed enhancements.
  84.  
  85. 04/09/96 -  INIREAD 3.0 ) These utilities, all of which edit one or more
  86. 04/08/96 - ENVMASTR 3.0 ) programs' environment spaces, incorporate improved
  87. 04/08/96 -    TZSET 3.0 ) environment location and editing functions that
  88.                           can find their target environments in upper memory
  89.                           blocks as well as in conventional memory. This
  90.                           makes them compatible with Windows 95, which can
  91.                           load COMMAND.COM and its environment into UMBs.
  92.  
  93. 03/22/96 -    OCOPY 2.2 - Bug fix - When attempting to copy a zero-length
  94.                           file, previous versions attempted to deallocate a
  95.                           random memory buffer that had never been allocated,
  96.                           due to an uninitialized pointer.
  97.  
  98. 03/22/96 -   INIMOD 2.1 ) These utilities, all of which edit files, formerly
  99. 03/22/96 -  XCHANGE 2.1 ) used system calls to copy their temporary files
  100. 03/22/96 -     YANK 2.1 ) back onto the originals. They now incorporate the
  101. 03/22/96 -  LINEMOD 2.1 ) OCOPY code to rewrite the original files, thus
  102.                           improving their speed, reducing their minimum
  103.                           memory requirements and eliminating potential
  104.                           problems that arise when doing system calls in a
  105.                           Windows DOS box.
  106.  
  107. 02/27/96 - INVORALL 2.1 - Added /T switch to add report of total bytes of
  108.                           all listed files following the list itself.
  109.  
  110. 02/09/96 -  FILEAGE 2.1 - Changed from "compatibility mode" to "sharing mode
  111.                           with deny-none" file access to improve likelihood
  112.                           of successfully reading the file's date/time stamp.
  113.  
  114. 02/08/96 -  DELFILE 1.0 - New utility to delete a file with all output sent
  115.                           to STDOUT; doesn't output to STDERR when a file
  116.                           cannot be deleted. Returns errorlevel indicating
  117.                           if the deletion was unsuccessful.
  118.  
  119. 12/13/95 -    OCOPY 2.1 - Changed from "compatibility mode" to "sharing mode"
  120.                           file access for better coordination with networks
  121.                           and with Windows 95 file sharing. This utility has
  122.                           an excellent chance of copying files when COPY and
  123.                           XCOPY cannot.
  124.  
  125. Below is a summary, in no particular order, of each utility and its usage:
  126.  
  127.  
  128.  
  129. TSR.COM
  130. -------
  131. This is a dummy TSR that does nothing but consume DOS memory (conventional
  132. or upper). Use it to test the minimum memory requirement for running any
  133. program of interest.
  134.  
  135. Syntax: [LH] TSR [ [+ | -][X]size[K] [A] ] | [U] | [S]
  136.  
  137. Default interpretation of size is "decimal bytes".
  138. "X" prefix specifies hexadecimal.  "K" suffix specifies kbytes (1K = 1024).
  139.  
  140. Use "+" or "-" prefix to change the last loaded existing dummy TSR's size by
  141. a differential amount. If +/- is omitted, the last loaded dummy TSR, if any,
  142. will attempt to change to the newly specified absolute size.
  143.  
  144. Option A adds another dummy TSR; U unloads the most recently added TSR.
  145. Option S displays the status of all installed dummy TSRs.
  146.  
  147. The minimum dummy TSR size is 192 (xC0) bytes; the maximum is 65520 (xFFF0),
  148. which is one paragraph (16 bytes) less than 64K. To quickly consume several
  149. hundred K of memory, enter "TSR 63K A" repeatedly, then use MEM to see the
  150. resulting largest executable program size. You can adjust the result in
  151. large increments by adding or removing TSRs. For small increments, use
  152. (for example) "TSR -64" and "LH TSR +32" to change the last loaded dummy
  153. TSR's resident size (64-byte decrease and 32-byte increase, respectively).
  154.  
  155. Note that memory allocations change in increments of 16 bytes minimum. Any
  156. TSR size specification that is not an integer multiple of 16 will be rounded
  157. upward. This is an artifact of the 80x86 processor's design.
  158.  
  159. A TSR's size can increase only when the new instance you are running is in
  160. another memory area. For example, to make the last TSR you loaded into
  161. conventional memory grow 80 bytes larger, use "LH TSR +80". This technique
  162. works if you have 3632 bytes or more free in upper memory blocks. When
  163. upper memory isn't available, use "TSR U" followed by "TSR newsize A" to
  164. unload the existing TSR and re-load it with the desired new size.
  165.  
  166. If you will be doing your DOS application testing under Windows, here's a
  167. tip to make adjustments easier: Pre-load a 5K dummy TSR into upper memory
  168. before starting Windows. You can add "LH TSR 5K A" to your AUTOEXEC.BAT
  169. file to ensure that it will be there when you need it. Why do this? Because
  170. when Windows starts, it will take whatever upper memory is left, leaving you
  171. no room to use "LH TSR +nn" for later conventional memory size adjustments.
  172. By preloading a 5K TSR, you're reserving the necessary space in upper memory.
  173. After Windows starts and you open a DOS session, use "TSR 192" to shrink the
  174. upper memory TSR to its minimum size. Now you can proceed to load additional
  175. dummy TSRs in conventional memory, knowing that you have enough free upper
  176. memory to make minor adjustments using the "LH" technique.
  177.  
  178.  
  179.  
  180. ISRUN.COM
  181. ---------
  182. This utility reports whether a specified program is loaded in DOS memory
  183. and, when found, displays the addresses of its code (PSP) and environment
  184. data segments.
  185.  
  186. Syntax: ISRUN progname   (maximum progname length = 8 characters)
  187.  
  188. ISRUN searches for the specified program in the Memory Control Block (MCB)
  189. chain and returns a logical errorlevel code.  This is most useful for
  190. determining whether your batch script is running under another process,
  191. such as a network LOGIN program, the RUNBAT$ utility, etc.  It can also
  192. report whether a particular TSR or device driver is loaded, and where.
  193. When progname is wild (*), all modules running under DOS are listed.
  194. The displayed segment address is that of the PSP, which is 1 greater than
  195. the MCB segment address displayed by MEM /D.  Likewise, the displayed
  196. environment data address is that of the data, not the environment's
  197. MCB address.
  198.  
  199. The address shown for ISRUN itself is that at which the next program will
  200. load, unless additional environment variable definitions require the allo-
  201. cation of a larger environment block.  When "ISRUN *" shows that ISRUN's
  202. environment block was previously used and released by some other resident
  203. program, an increased environment will require a new memory block allo-
  204. cation, shifting the program load point by a number of segments equal to
  205. (new environment size in bytes / 16) + 1, rounded upward.  When ISRUN is
  206. already using a new environment block (i.e., one that is not listed for
  207. any other program), an increased environment will simply increase the size
  208. of that block, moving the program load address in increments of 1 segment
  209. for every 16 bytes of new environment.
  210.  
  211. Errorlevel 0 = specified program not found
  212. Errorlevel 1 = specified program is in memory
  213. Errorlevel 2 = syntax error
  214. Errorlevel 3 = system error, cannot locate CVT
  215.  
  216. The CVT is the Configuration Variable Table, maintained within DOS, from
  217. which a pointer to the first MCB is obtained. The CVT exists in DOS
  218. versions 2 and higher, so an errorlevel 3 would indicate that the
  219. operating system has become corrupted or is incompatible with MS-DOS
  220. in the manner of locating the CVT.
  221.  
  222.  
  223.  
  224. FILEINFO.EXE
  225. ------------
  226. This DOS-based utility locates and displays official Windows File Information
  227. from any program module adhering to the "StringFileInfo" standard. The "File
  228. Version" returned in the FILEINFO report is the best authority as to which
  229. copy of a DLL file is actually the most up-to-date, regardless of what the
  230. date/time stamps say. Software vendors often redate the files included in
  231. their packages to reflect the date of package issue, causing obsolete DLLs
  232. to appear newer than they really are. FILEINFO can help set things straight.
  233.  
  234. Syntax: FILEINFO filespec [/s]
  235.  
  236. Searches for standard Windows file information (StringFileInfo) and reports
  237. the file name, date and time stamp, and size, followed by either a summary
  238. of the found information or a statement that no other info is available.
  239. Switch /s enables subdirectory searching.
  240.  
  241. Returns errorlevel 0 if info found, 1 if info not found, 2 if error.
  242. When wildcards are used, highest level for the file group is returned.
  243.  
  244.  
  245.  
  246. XCHANGE.EXE
  247. -----------
  248. Global find-and-replace for any kind of file, of any size.
  249. Suitable for use at the command prompt or in a batch file.
  250. It can even be used to patch code within an executable file, provided that
  251. the search and replace sequences contain the same quantity of bytes.
  252. All byte values, 0 through 255 (x00 through xFF) are supported.
  253.  
  254. Syntax: XCHANGE [/i] filespec "searchspec" ["replacespec"]
  255.         XCHANGE [/i] filespec "searchspec" @imagefile
  256.         XCHANGE [/i] filespec @scriptfile
  257.  
  258. Optional switch /i = Ignore case (can be in any parameter position).
  259.  
  260. Searchspec and replacespec are each made up of any combination of literals
  261. and ^-prefixed ASCII codes. ASCII codes must be followed by commas if next
  262. character is a digit (0-9 following a decimal; 0-9 or A-F following a hex).
  263. Use double ^ or , for literal ^ or , in string, or use ^94 & ^44 (^x5E & ^x2C).
  264. If replacespec is omitted, the search string is removed; nothing is inserted.
  265.  
  266. The @imagefile reference places an exact copy of the image file in place of
  267. each occurrence of the search string (in lieu of replacespec).
  268.  
  269. The @scriptfile reference opens the script file, which contains the search
  270. and replace specifications (or searchspec and @imagefile reference). This is
  271. most useful when the command line would exceed the DOS limit of 127 charac-
  272. ters if the search and replace specs were spelled out on the command line.
  273.  
  274. Known limitation: If the search string begins with multiple instances of one
  275. character, and the file being searched contains the search string but has
  276. more instances of the leading character than are included in the search
  277. string, the search string might not be found. For example, if the file
  278. contains "This   is   a   test" (three spaces between words) and the search
  279. string is defined as "  test" (two leading spaces), the search string will
  280. be missed. Work around this by searching for sequences that don't start with
  281. multiple instances of the same character.
  282.  
  283. Examples:
  284.  
  285. 1) XCHANGE filename.ext "your place^13^10my place" "your^13^10place^13^10
  286.                          my^13^10place"
  287.  
  288. This breaks up consecutive lines "your place" and "my place", putting each
  289. word on its own line.
  290.  
  291.  
  292. 2) XCHANGE filename.ext "^13^10,0" "^13^10 "
  293.  
  294. This removes any zero at the start of a line, replacing it with a space.
  295. The comma ends the ASCII code so that it won't be interpreted as 100.
  296.  
  297.  
  298. 3) XCHANGE filename.ext "Elementary,, my dear Watson!" "Gee,, I'm confused!"
  299.  
  300. Note the use of double commas to represent single commas. This could also
  301. be expressed as follows:
  302.  
  303.    XCHANGE filename.ext "Elementary^44 my dear Watson!" "Gee^44 I'm confused!"
  304.  
  305. or as follows:
  306.  
  307.    XCHANGE filename.ext "Elementary^x2c my dear Watson!" "Gee^x2c I'm confused!"
  308.  
  309.  
  310. 4) XCHANGE filename.ext @script.fil
  311.  
  312. where script.fil contains:
  313.  
  314.    "Elementary,, my dear Watson!" @image.fil
  315.  
  316. and image.fil contains:
  317.  
  318.    Gee, I'm confused!
  319.  
  320. without any CR/LF at the end of the line.
  321.  
  322. Double comma (or equivalent ASCII code) is needed in the script, but not in
  323. the image, because the image does not get parsed but is used as-is. Scripts
  324. are generally used only for extremely long specifications, but an image could
  325. also be something extracted from another file during a batch process.
  326.  
  327.  
  328. XCHANGE returns errorlevel codes for use in a batch file. Type XCHANGE
  329. with no parameters to get a syntax summary complete with list of
  330. errorlevel codes.
  331.  
  332.  
  333.  
  334. YANK.EXE
  335. --------
  336. This is similar to XCHANGE.EXE with one important exception. Whereas
  337. XCHANGE removes/replaces only the sought text, YANK removes/replaces the
  338. ENTIRE LINE that contains the sought text. It "yanks" out the whole line,
  339. including the CR/LF at the end. Therefore, anything specified as a replace-
  340. ment will be inserted at the start of the subsequent line. If the insertion
  341. is to stand on a line of its own, include CR/LF (^13^10) at the end of it.
  342. Also, because it is line-oriented, it can handle only ASCII files, not
  343. binary files (valid ASCII codes for YANK are 1-255 (x01-xFF).
  344.  
  345.  
  346.  
  347. LINEMOD.EXE
  348. -----------
  349. Another variation on XCHANGE, LINEMOD changes only targeted lines, as
  350. identified by a unique identifier string:
  351.  
  352. LINEMOD [/i] fs "idstrng" "[srchstrng][^chr,][...]" ["[replstrng][^chr,][...]"]
  353. LINEMOD [/i] fs "idstrng" @scriptfile
  354. LINEMOD [/i] fs "idstrng" "srchspec" @imagefile
  355.  
  356. For each line containing the ID string, the first occurrence of the search
  357. string will be converted to the replacement string.  If all occurrences are
  358. to be changed, loop back to repeat the command until errorlevel 1 occurs.
  359. Being line-oriented, it is restricted to ASCII files, as is YANK, and it
  360. uses the same ASCII character definitions as YANK.
  361.  
  362.  
  363.  
  364. SEEK.EXE
  365. --------
  366. This handy alternative to the DOS FIND command is extremely useful to batch
  367. programmers who simply want to find out if something exists in a file.
  368. SEEK works exactly like XCHANGE, but without the replacement string. It looks
  369. for the search string and reports back whether or not it was found. To do
  370. this with FIND, the batch programmer had to go through a sequence like this:
  371.  
  372.    set found=N
  373.    find "searchstring" <sourcefile >temp1.fil
  374.    copy temp1.fil temp2.fil
  375.    if exist temp2.fil set found=Y
  376.    del temp?.fil
  377.    if %found%==Y do whatever...
  378.    set found=
  379.  
  380. With SEEK, it's as easy as this:
  381.  
  382.    seek sourcefile "searchstring"
  383.    if errorlevel 1 do whatever...
  384.  
  385. Another advantage of SEEK is that the search string can contain control
  386. characters, graphics characters, CR/LF sequences, etc., that FIND cannot
  387. look for. SEEK handles binary files as well as ASCII files; it can seek
  388. search strings that include nulls.
  389.  
  390.  
  391.  
  392. SCANSTR.COM
  393. -----------
  394. This program scans a string to determine whether it contains a second
  395. specified string:
  396.  
  397. SCANSTR [/i] "string to be scanned" "[srchstrng][^[x]chr,][...]"
  398.  
  399. Switch /i = ignore case (can be in any parameter position); chr = ASCII.
  400. The search string can be any combination of literals and ^-prefixed,
  401. comma-delimited ASCII codes ^0 through ^255 or ^x00 through ^xFF.
  402. Use double ^ or , for literal ^ or , character within the search string.
  403. Quotes may be omitted if there are no spaces within the search string.
  404. The string to be scanned is not subject to such parsing.
  405.  
  406. Primarily useful for screening the content of environment variables,
  407. SCANSTR returns a message and errorlevel code indicating the relative
  408. position of the search string within the target string.  If the search
  409. string is not found within the target string, the return code is zero.
  410. A return code of 1 indicates that the search string begins at the first
  411. character of the target string; 2 indicates that it begins at the second
  412. character, etc.
  413.  
  414.  
  415.  
  416. SPLITFIL.EXE
  417. ------------
  418. Splits any file into two parts at the first occurrence of a search string,
  419. other than at the very beginning of the file.
  420.  
  421. Syntax: SPLITFIL [/i] file1 file2 ["[srchstrng][^chr,][...]"] | [@scriptfile]
  422.  
  423. SPLITFIL searches file1 for the search string and truncates it just prior
  424. to the first occurrence; the search string and all remaining bytes of file1
  425. are written to file2, which is opened in "append" mode so that a new file 
  426. can be readily assembled from pieces of other files. If appending is not
  427. desired, be sure to delete any existing file2 before using SPLITFIL. The
  428. files are unchanged if the search string is not found. Specific file names
  429. (full qualification optional) must be provided; wild cards are not allowed.
  430.  
  431. Long search string descriptions can be placed in a script (8,192 char. max.).
  432. Switch /i = ignore case; this can be in any parameter position.
  433. Search string can be any combination of literals and ^-prefixed, comma-
  434. delimited ASCII codes (^0 through ^255 or ^x00 through ^xFF).
  435. Use double ^ or , for literal ^ or , character within a string.
  436. Quotes may be omitted if there are no spaces within strings.
  437.  
  438. Echos "Split" or "Not Split" to visually indicate outcome.
  439. Returns errorlevel: 0 = split, 1 = not split, 2 = unable to write,
  440. 3 = syntax or memory error,  4 = file not found, 5 = error during read/write,
  441. 6 = insufficient disk space, 7 = read-only file, 8 = write-protected.
  442.  
  443.  
  444.  
  445. OCOPY.EXE
  446. ---------
  447. Overwrites a specified target file with a copy of a specified source file.
  448.  
  449. OCOPY file1 file2
  450.  
  451. OCOPY is a true overwriting file copier.  Unlike COPY, which effectively
  452. deletes any existing file of the target name and re-creates the file in a
  453. new storage area, OCOPY ensures that the new file overwrites the existing
  454. file, using the same storage allocation.  OCOPY copies any file, regardless
  455. of S, H, or R attributes, but does not pass along those attributes.  If file2
  456. exists, any "R" attribute must first be removed; it will be overwritten and
  457. its size and date/time stamp will be adjusted to match file1.  If file2 does
  458. not exist, it will be created.
  459.  
  460. File names must be explicit; i.e., file2 must be a complete file name, not
  461. just a path, and neither file name can contain wildcards.  Beginning with
  462. Version 1.2, OCOPY incorporates Novell Netware functions to make network
  463. errors invisible to the user (previous versions required user interaction if
  464. a "file busy" condition prevented overcopying).  Version 2.x maximizes speed
  465. by allocating multiple memory buffers up to a total of all available DOS RAM
  466. or the source file size, whichever is less.  Versions 2.1 and higher are
  467. share-aware for smoother operation under Windows 95 and other networks.
  468.  
  469. Visually confirms success or failure of the operation, and returns errorlevels:
  470. 1=Read error or not found; 2=Write error, non-destructive (may be bad path);
  471. 3=Syntax or memory error; 4=Unable to truncate target file to source's size;
  472. 5=Write error (destructive), target file deleted.
  473.  
  474.  
  475.  
  476. FILEAGE.EXE
  477. -----------
  478. Determines the age of the specified file, in the specified units.
  479.  
  480. Syntax: FILEAGE filename [/s | /n | /h | /d | /w | /m | /y]
  481.  
  482. Returns an errorlevel code equal to the quantity of time units elapsed
  483. since the file's modification date/time stamp.  Optional parameter can
  484. specify units of seconds, minutes, hours, days, weeks, months, or years.
  485. Default units are days.  The file's age is shown on the screen and returned
  486. as an error code.  Returns 252 or more if unable to process request.  The
  487. largest valid quantity returned by errorlevel is 250, but larger values
  488. may be displayed (returns nonfatal errorlevel 251).  Fatal error codes are:
  489.  
  490. 252 = File is busy, permission denied  253 = Invalid futuristic date/time stamp
  491. 254 = File not found or inaccessible   255 = Syntax error
  492.  
  493.  
  494.  
  495. SRCHDIR.COM
  496. -----------
  497. Subdirectory search for specified file(s).
  498.  
  499. Syntax: SRCHDIR filespec [ x | X | /x | /X | / ]
  500.  
  501. SRCHDIR produces a list of all files matching the file specification in the
  502. base directory (i.e., current working directory, or other directory shown
  503. in the filespec) and all of its subdirectories. This list differs from that
  504. obtained by the DOS 5 command "DIR filespec /s /b" in two ways: it includes
  505. each file's date/time stamp while omitting the usual DIR header and trailer,
  506. and it lists hidden files as well as normal files, including any that are
  507. in hidden subdirectories.  By including any one of the alternate parameters
  508. shown, the subdirectory search can be omitted.
  509.  
  510. Returns errorlevel 1 if there are no files matching the filespec.
  511.  
  512.  
  513.  
  514. INVORALL.EXE
  515. ------------
  516. File Inventory Utility with Multiple Seeks and Critical Error Trapping.
  517.  
  518. Syntax:  INVORALL d:path\seek1 [seek2 [seek3 [...]]] [ /X ] [ /T ]
  519. Example: INVORALL c:\.exe .com
  520.  
  521. Switch /X excludes subdirectories; /T adds total bytes listed.
  522.  
  523. INVORALL is an enhanced SRCHDIR that returns all file names that include any
  524. of the specified seek strings.  In addition to the information returned by
  525. SRCHDIR, the file size (up to 2 GB) is appended to each line, and extremely
  526. long paths are handled gracefully by omitting the lowest subdirectory levels
  527. (substituting "\...\") and showing only what fits in the space.  The maximum
  528. number of seek strings is limited only by the 127-character command line.
  529.  
  530. If seek1 contains wild cards (* or ?), it will serve as a first-level
  531. filter; i.e., only files that satisfy the seek1 file specification (and
  532. also contain any one or more of seek2 through seekN, if specified) will be
  533. reported.  If seek1 does not contain wild cards, there is no first-level
  534. filtering; i.e., seek1 then behaves just like any other seekstring.  The
  535. other seekstrings (seek2 through seekN) must NOT contain any wildcards.
  536.  
  537. This utility employs critical error trapping, so it can be used on a
  538. removable-media drive without triggering unwanted error messages.  File
  539. inventory collection can be attempted on all possible drive letters,
  540. regardless of whether they exist or have media in them.  Returns errorlevel:
  541. 1 = nothing found, 2 = memory allocation error, 3 = syntax or path error.
  542.  
  543. For example, to inventory all the .EXE, .COM, .SYS, and .DLL files on a
  544. system, the following commands are used:
  545.  
  546.    INVORALL C:\.EXE .COM .SYS .DLL >INVNTORY.TXT
  547.    INVORALL D:\.EXE .COM .SYS .DLL >>INVNTORY.TXT
  548.    INVORALL E:\.EXE .COM .SYS .DLL >>INVNTORY.TXT
  549.  
  550. Continue in like fashion for all drives that could potentially be present.
  551. It doesn't matter if the drive doesn't exist or has no media in it. Note
  552. that there are NO wild cards in the above specifications; if C:\*.EXE had
  553. been specified, nothing would be reported, because there is no .EXE file
  554. that also has .COM, .SYS, or .DLL in its name.
  555.  
  556. If you are searching only for particular .EXE files, that's where the first
  557. level filter comes in:
  558.  
  559.     INVORALL C:\*.EXE HJPRO. WPWIN. WINWORD. HGWIN. >INVNTORY.TXT
  560.     etc.
  561.  
  562. This will collect data on the files of interest as quickly as possible,
  563. without wasting time comparing non-.EXE files to the seek strings.
  564.  
  565. If the specific files sought have a combination of extensions, their full
  566. names should be specified, without wild cards:
  567.  
  568.     INVORALL C:\HJPRO.EXE WPWIN.EXE XTGOLD.COM LIST.COM >INVNTORY.TXT
  569.     etc.
  570.  
  571. This will generally be faster than using two separate INVORALL commands
  572. on each drive (one with *.EXE and another with *.COM first level filters)
  573. because the latter method would require a second full search of the drive's
  574. subdirectory structure.
  575.  
  576. Use INVORALL to find out if a file exists on a drive you aren't sure is
  577. there, without creating a messy error display.  For example, suppose you
  578. want your batch script to find out if the PC has Windows installed on
  579. Drive D: or E: instead of Drive C:.  If you use a command of the form
  580. "if exist d:\windows\system.ini ..." and Drive D: is a CD ROM that doesn't
  581. have a CD in it, the user will see a nasty "Not ready reading Drive D:"
  582. error display and will have to decide whether to Abort, Retry, Ignore, or
  583. Fail the error.  Not knowing why you are trying to read his CD ROM in the
  584. first place, he is likely to be confused and angry.  Instead, use the form
  585. "invorall d:\windows\system.ini /x >nul" and "if not errorlevel 1 ..." to
  586. get the information you need without involving the user in any way.
  587.  
  588.  
  589.  
  590. MAKEDIR.COM and REMOVDIR.COM
  591. ----------------------------
  592. These are non-complaining substitutes for the DOS "mkdir" or "md" command,
  593. and "rmdir" or "rd" command, respectively, suitable for use in batch files.
  594.  
  595. Syntax: MAKEDIR dirspec
  596.     or: REMOVDIR dirspec
  597.  
  598. MAKEDIR attempts to create the specified directory. If the directory already
  599. exists, its report of "Cannot create directory dirspec" is directed to STDOUT
  600. where it can be readily suppressed with ">nul". Returns errorlevel 1 if the
  601. directory cannot be created.
  602.  
  603. Similarly, REMOVDIR attempts to remove the specified directory, and its
  604. report of being unable to do so is redirectable. It returns errorlevel 1
  605. if the directory cannot be removed.
  606.  
  607. Typically, one would have to do the following when writing a batch to install
  608. files into a subdirectory:
  609.  
  610.    if not exist dirspec\nul md dirspec
  611.    copy path\*.* dirspec >nul
  612.  
  613. Unfortunately, in some situations (e.g., network drives, or a DOS box in OS/2) 
  614. DOS is fooled into thinking the directory already exists even when it doesn't.
  615. The result is one large file named DIRSPEC instead of a directory with files.
  616. With MAKEDIR, this is not a problem. The batch becomes:
  617.  
  618.    makedir dirspec >nul
  619.    copy path\*.* dirspec >nul
  620.  
  621. This will create the directory properly in any operating environment.
  622.  
  623. The companion REMOVDIR command is provided for convenience, to avoid
  624. constructs of the form "if not exist dirspec\*.* rd dirspec". This is
  625. especially helpful when other conditions being tested in the batch are
  626. already pushing the command line length to its 127 character limit.
  627.  
  628.  
  629.  
  630. DELFILE.COM
  631. -----------
  632. Just as REMOVDIR gets rid of directories in a batch-friendly way,
  633. DELFILE gets rid of unwanted files.
  634.  
  635. Syntax: DELFILE filespec
  636.  
  637. Its report, announcing whether or not the file was deleted, is redirectable.
  638. It returns errorlevel 1 if the file cannot be deleted.
  639.  
  640.  
  641.  
  642. BIN2ASC.EXE and ASC2BIN.EXE
  643. ---------------------------
  644. This is a complementary pair of programs for converting binary files to
  645. ASCII files and back again.
  646.  
  647. Syntax: BIN2ASC binfile.ext ascfile.ext
  648.         ASC2BIN ascfile.ext binfile.ext
  649.  
  650. Some communication protocols, designed for use with ASCII files, cannot
  651. transfer binary files due to their interpretation of special characters
  652. within the data stream. BIN2ASC converts a binary file of size x to an
  653. ASCII file of size 2x that contains the hexadecimal ASCII representation
  654. of the binary values found in the original file. ASC2BIN converts such a
  655. file back to its original binary form.
  656.  
  657.  
  658.  
  659. INTADD.COM
  660. ----------
  661. Integer Addition program suitable for use with decimal or hexadecimal values.
  662.  
  663. Syntax: INTADD [x][-]value1 [x][-]value2
  664.  
  665. The output is a "SET RESULT=sum" command printed to stdout, which can be
  666. redirected into a batch file and called to create the RESULT environment
  667. variable. The sum is formatted as either a four-digit hexadecimal value
  668. with leading zeros, or as a non-padded decimal value. The format of value1
  669. determines the format of the sum. The formats of value1 and value2 need not
  670. match. A leading "x" identifies the value as hexadecimal, but the output sum
  671. will not include an x. The input parameters are not case-sensitive.
  672. Permissible values are hexadecimal 0000 to FFFF or decimal -32768 to 32767.
  673. Hexadecimal results of 8000 through FFFF are considered to be "negative".
  674. The returned errorlevel code is 0 for positive result, 1 for negative, and
  675. 2 for syntax error.
  676.  
  677. Examples:
  678.  
  679.    INTADD xc800 x0400    produces   SET RESULT=CC00     with errorlevel 1
  680.  
  681.    INTADD xc800 -1       produces   SET RESULT=C7FF     with errorlevel 1
  682.  
  683.    INTADD xc800 x-c000   produces   SET RESULT=0800     with errorlevel 0
  684.  
  685.    INTADD x1000 4096     produces   SET RESULT=2000     with errorlevel 0
  686.  
  687.    INTADD 4096 x1000     produces   SET RESULT=8192     with errorlevel 0
  688.  
  689.    INTADD x7000 8192     produces   SET RESULT=9000     with errorlevel 1
  690.  
  691.    INTADD 8192 x7000     produces   SET RESULT=-28672   with errorlevel 1
  692.  
  693. Batch Example: Note that the "set v1" used here might be replaced with a
  694.                batch-generated setting produced by reading a configuration
  695.                file in a real situation.
  696.  
  697.    set v1=c800
  698.    intadd x%v1% x03FF >temp.bat
  699.    call temp.bat
  700.    del temp.bat
  701.  
  702.    You now have a RESULT environment variable that contains CC00.
  703.    Continuing:
  704.  
  705.    set test1=N
  706.    set test2=N
  707.    intadd x%result% x1000 >nul
  708.    if errorlevel 1 set test1=Y
  709.    intadd x%v1% x-c800 >nul
  710.    if not errorlevel 1 set test2=Y
  711.    if not %test1%%test2%==YY goto end
  712.    echo Values are within the upper memory range; setting EMM exclusions:
  713.    xchange /i c:\config.sys "emm386.exe" "emm386.exe x=%v1%-%result%" >nul
  714.    inimod c:\windows\system.ini "386Enh" "EMMExclude" "%v1%-%result%" /a >nul
  715.    :end
  716.  
  717.  
  718.  
  719. INPUT.COM
  720. ---------
  721. Provides text input within a batch file, one line of up to 128 characters.
  722.  
  723. Syntax: INPUT "prompt" filespec
  724.  
  725. The prompt is displayed, and characters are fetched from STDIN until a
  726. carriage return is received. The received characters are then appended to
  727. the specified file, minus the carriage return. If a terminating carriage
  728. return is required, the INPUT statement must be followed by the command,
  729.  
  730.    echo.>>filespec
  731.  
  732. INPUT has many possibilities. Because it doesn't pass the carriage return,
  733. you can concatenate many responses or other text to the initial response.
  734. Because it doesn't overwrite an existing file, concatenation is the default.
  735. If you need a new file, be sure to delete any existing file by that name
  736. before invoking INPUT.
  737.  
  738. Its input can be redirected from another file. This is a handy way of
  739. creating strings of text that aren't return-terminated. For example, when
  740. your batch says "echo string>file1", you actually get "string" + CRLF in the
  741. file. To get just "string" without the CRLF, do this after the echo:
  742.  
  743.    input "" file2 <file1
  744.  
  745. INPUT is also very nice for getting input for other commands that don't
  746. behave as you would like. For example, suppose another command displays a
  747. nice prompt and requests input, but then messes up the screen with a report
  748. of what it's doing with the input. If you redirect its output to nul or to
  749. a file, you lose the nice prompt and the user can't see what he's typing.
  750. Here's the solution:
  751.  
  752.    if exist file1 del file1
  753.    input "nice prompt" file1
  754.    echo.>>file1
  755.    messycommand <file1 >nul
  756.  
  757. This lets the user see the nice prompt (which you can now tailor to your
  758. liking), and it lets the messy command receive the intended input without
  759. messing up the screen.
  760.  
  761. Another great use of INPUT is to set environment variables with input typed
  762. by the user. Here's how:
  763.  
  764.    echo set envar=>temp.fil
  765.    if exist temp.bat del temp.bat
  766.    input "" temp.bat <temp.fil
  767.    input "Please enter the desired setting:" temp.bat
  768.    echo.>>temp.bat
  769.    call temp.bat
  770.    del temp.bat
  771.    del temp.fil
  772.  
  773. You now have an environment variable named ENVAR that contains the string
  774. typed by the user.
  775.  
  776.  
  777.  
  778. TPAUSE.COM
  779. ----------
  780. Timed Pause displays a user-specified prompt and accepts a single-keystroke
  781. response. If no key is pressed within the timeout interval, it terminates
  782. with zero errorlevel.
  783.  
  784. Syntax: TPAUSE [/T:hh:mm:ss] "prompt"[,keylist]
  785.  
  786. Timeout may be from 1 second to 23 hours 59 minutes 59 seconds, or infinite.
  787. Default timeout = 1 minute.  Keylist is case-insensitive.
  788. If keylist is omitted, any keystroke will terminate the delay.
  789. Returns errorlevel code = position of keystroke within list, 0 = timed out.
  790. See (and execute) TPHELP.BAT for usage examples.
  791.  
  792. The colons are optional; when omitted there must be two digits per portion
  793. with the exception of seconds. Short strings are assumed to represent short
  794. intervals. For example, /t5 = 5 seconds, /t5:00 or /t0500 = 5 minutes,
  795. /t050000 = 5 hours, /t5000 or /t500 = 50 minutes. Times of less than 100
  796. seconds may be represented as seconds; e.g., /t90 = 90 seconds. To disable
  797. timeout (infinite wait) use zero, /t0.
  798.  
  799.  
  800.  
  801. TZSET.EXE
  802. ---------
  803. Automatic TZ Adjustment for Daylight Savings Time.
  804.  
  805. TZSET automatically sets the TZ environment variable to either CST6 or
  806. CST6CDT, depending on whether or not the current system date is between the
  807. first Sunday in April and the fourth Sunday in October. The central time zone
  808. is only a default; if you use it in another time zone, simply preset TZ to
  809. the base setting for your time zone (e.g., SET TZ=EST5) before invoking
  810. TZSET. It will then produce either the same setting or one with the proper
  811. "_DT" appended to it (e.g., SET TZ=EST5EDT). If the current TZ setting is
  812. undefined, or if its 2nd through 4th characters are not "ST" followed by a
  813. numeric character, the default CST zone is used. A confirmational message of
  814. the form ":: Setting TZ=CST6CDT" is issued to STDOUT. The double colon is
  815. for compatibility with the old TZSET.COM, which always generated SET TZ=
  816. commands that had to be captured in a temporary batch; this prevents syntax
  817. errors when its new output is inadvertently executed.
  818.  
  819. The environment that gets modified is that of the active COMMAND.COM command
  820. processor (i.e., if you are shelled out to DOS from an application, or in a
  821. DOS box in Windows, the subordinate COMMAND.COM environment in which you are
  822. working gets modified rather than that of the master command environment
  823. created at boot time; this is the same way the SET command works). This can
  824. fail only if the command processor has a name other than COMMAND.COM or has
  825. inadequate environment space to hold the new setting.
  826.  
  827. In the case of a differently-named command processor, TZSET will generate an
  828. errorlevel of 1, and it will output a SET command that can be captured in a
  829. temporary batch file as follows:
  830.  
  831.    tzset >temp.bat
  832.    if errorlevel 1 call temp
  833.    del temp.bat
  834.  
  835. If the error condition was generated by inadequate space in the command
  836. processor environment, this will generate an "Out of environment space"
  837. message when the "call temp" executes. TZSET itself does not produce such
  838. a message, but returns errorlevel 1 to flag its inability to change the
  839. environment.
  840.  
  841.  
  842.  
  843. FINDALL.EXE
  844. -----------
  845. An alternative to the DOS FIND command.  The syntax is different:
  846.  
  847. FINDALL [/i] filespec "[srchstrng][^[x]chr,][...]"
  848. FINDALL [/i] filespec @scriptfile
  849.  
  850. Switch /i = ignore case (can be in any parameter position); chr = ASCII.
  851. Search string can be any combination of literals and ^-prefixed, comma-
  852. delimited ASCII codes (^1 through ^255 or ^x01 through ^xFF).
  853. Use double ^ or , for literal ^ or , character within a string.
  854. Quotes may be omitted if there are no spaces within strings.
  855.  
  856. NOTE: FIND's /V, /C, and /N switches are not supported.
  857.  
  858. This program provides "ignore case" (/I) capability to all versions of DOS
  859. from 3.0 on up.  It will output lines of up to 8192 characters containing
  860. the sought text.  By using wildcards in the filespec, multiple files may be
  861. searched with a single command, and the output is not dirtied up with the
  862. names of files being checked.
  863.  
  864.  
  865.  
  866. LMORE.COM
  867. ---------
  868. An alternative to the DOS MORE command.  Use it in identical fashion.
  869.  
  870. Although the DOS MORE command has improved in recent versions, it is still
  871. quite messy, especially when dealing with lines longer than 80 characters
  872. (i.e., lines that wrap around to display as multiple-line records).  It has
  873. a bad habit of printing its "-- More --" prompt in the middle of a line and
  874. thoroughly messing up the display format of all remaining display lines of
  875. the affected record.
  876.  
  877. LMORE is a line-based MORE that checks the length of each input record to
  878. ensure that it will fit on the current screenful before displaying it.
  879. If the entire record cannot fit on the screen, the "-- More --" prompt
  880. appears in the position that the first line would occupy.  When a key is
  881. pressed, it backspaces over its prompt, overwrites the prompt with spaces,
  882. then backspaces over it again so that the display can continue in uninter-
  883. rupted fashion.  If the keystroke is Esc or Ctrl-C, the process is aborted.
  884.  
  885.  
  886.  
  887. INIMOD.EXE
  888. ----------
  889. This utility allows you to add, delete, or modify settings within specific
  890. sections of Windows-style .INI files.
  891.  
  892. Syntax variations:
  893.  
  894.    1) INIMOD filespec "section" "variable" "value" [/a | /d]
  895.    2) INIMOD filespec "section" "variable" /d
  896.    3) INIMOD filespec "section" /d
  897.  
  898. Variation 1 looks for the specified variable name within the specified
  899. section and changes its value to the one specified. If the section does
  900. not exist, it gets appended to the end of the file, and if the variable
  901. does not exist within the specified section, it gets appended to the end
  902. of that section. Omitting the value will leave the variable in place with
  903. nothing to the right of the equals sign. Options /a and /d are for variable
  904. names that may exist in more than one instance within the section; e.g.,
  905. the many "device=" lines in the [386Enh] section of SYSTEM.INI. Option /a
  906. will add the requested setting, if not already present, without affecting
  907. any existing settings that use the same keyword. Option /d will delete
  908. only the line in which the setting is functionally equal to that specified.
  909.  
  910. Variation 2 looks for the specified variable name within the specified
  911. section and deletes that line. Be careful; if multiple instances of the
  912. same keyword appear in that section, all will be deleted.
  913.  
  914. Variation 3 looks for the specified section header and deletes it along
  915. with all variables following it until the next section header is reached.
  916.  
  917. All parameters are case-insensitive; however, a new or modified setting
  918. will be written in the exact case used on the command line. All syntax
  919. variations perform cleanup of redundant settings that are functionally
  920. equal to the specified setting.
  921.  
  922. The present implementation handles just one setting at a time. If multiple
  923. settings are to be made, use a batch to call INIMOD for each one. Output
  924. to the screen identifies the changes made, or the fact that no change was
  925. necessary. The INIMOD command, entered without parameters, will display a
  926. syntax summary and a list of errorlevel codes.
  927.  
  928.  
  929.  
  930. INIREAD.EXE
  931. ----------- 
  932. This .INI file interpreter for batch files allows you to capture any
  933. desired setting, from any section, in the environment variable you name.
  934.  
  935. Syntax: INIREAD filename "section heading" "parameter" "envarname"
  936.  
  937. If the parameter is found in multiple lines of the same section (e.g.,
  938. "device=" in the [386Enh] section of SYSTEM.INI), the first occurrence
  939. will be returned in the specified variable, and the subsequent occurrences
  940. will be returned in variables having similar names with numerical suffixes
  941. 2 through n, where n is the number of occurrences found.
  942.  
  943. Example: INIREAD c:\windows\system.ini "386enh" "device" "dev$dvr"
  944. will return the first device= setting in environment variable DEV$DVR;
  945. if there are 15 device= settings, the rest will be in DEV$DVR2 through
  946. DEV$DVR15.
  947.  
  948. Multiple parameters can be handled in your batch via the INTADD.COM
  949. and XCHANGE.EXE utilities in a loop structure. For example:
  950.  
  951.    @echo off
  952.    INIREAD c:\windows\system.ini "386enh" "device" "dev$dvr" >nul
  953.    if errorlevel 2 goto end
  954.    echo Setting #1: %dev$dvr%
  955.    set result=1
  956.    :chknxt
  957.    intadd %result% 1 >temp1.bat
  958.    copy temp1.bat temp2.bat >nul
  959.    xchange temp2.bat "SET RESULT=" "SET ENVAR=%%DEV$DVR" >nul
  960.    xchange temp2.bat ^13 "%%^13" >nul
  961.    call temp2.bat
  962.    if %envar%.==. goto end
  963.    call temp1.bat
  964.    echo Setting #%result%: %envar%
  965.    goto chknxt
  966.    :end
  967.    del temp?.bat
  968.    set result=
  969.    set envar=
  970.    echo End of list.
  971.  
  972. Echos an indication of the outcome and returns an errorlevel code as follows:
  973. 0 = one setting found,  1 = multiple settings found,   2 = no setting found,
  974. 3 = section not found,  4 = out of environment space,  5 = file inaccessible,
  975. 6 = other error (syntax, path interpretation, or unable to locate environment)
  976.  
  977. Note: If the sought parameter is found in the specified section, but has
  978.       nothing to the right of the "=" sign, the specified environment
  979.       variable will be cleared and the errorlevel will be zero (or 1, if
  980.       the empty setting was one of multiple settings), as the empty condition
  981.       correctly reflects the content of the .INI file. However, when the
  982.       errorlevel is 2 or greater, the environment table will retain any
  983.       previously existing settings for variables corresponding to parameters
  984.       that are not defined in the file or were not successfully processed
  985.       prior to the error.
  986.  
  987.  
  988.  
  989. RUNBAT$.EXE
  990. -----------
  991. This is a batch file launcher for use within a user's Novell network
  992. login script. It looks up the COMSPEC environment variable and calls
  993. whatever is referenced therein (i.e., the fully qualified path to the
  994. command line processor), passing it parameters requesting a 5K space
  995. for environment variables (/E:5120) and command execution (/C) plus
  996. whatever parameters (maximum quantity of 9) are included on the RUNBAT$
  997. command line.
  998.  
  999. For example, if COMSPEC=C:\DOS\COMMAND.COM, then the following login
  1000. script entry:
  1001.  
  1002.    #RUNBAT$ Y:\PUBLIC\BATCH\PROCESS.BAT PARM1 PARM2
  1003.  
  1004. is equivalent to this:
  1005.  
  1006.    #C:\DOS\COMMAND.COM /E:5120 /C Y:\PUBLIC\BATCH\PROCESS.BAT PARM1 PARM2
  1007.  
  1008. The use of RUNBAT$.EXE makes this work regardless of where COMMAND.COM
  1009. actually is, and eliminates the awkward COMMAND.COM parameter syntax
  1010. from the login script. RUNBAT$.EXE consumes virtually no memory, loading
  1011. COMMAND.COM into the memory space that RUNBAT$.EXE itself originally
  1012. occupied.
  1013.  
  1014.  
  1015.  
  1016. ENVMASTR.EXE
  1017. ------------
  1018. When you use the SET command while shelled out from an application, it sees
  1019. only the local environment of the shell. ENVMASTR lets you work in the
  1020. master environment that was created when the system was booted, and/or
  1021. any subordinate environments. This is especially useful when using RUNBAT$
  1022. to execute a batch whose environment manipulation is expected to stick to
  1023. the command environment from which RUNBAT$ was executed. The batch can
  1024. either make all environment changes through ENVMASTR, or make them locally
  1025. and then use ENVMASTR to copy the modified environment into the master.
  1026. A display-only option lets you view the content of any environment space,
  1027. complete with a report of the environment size, bytes used and bytes free.
  1028. Beginning with Version 3.0, ENVMASTR can display and edit environment blocks
  1029. in upper memory as well as conventional memory, and any instance of COMMAND
  1030. found in upper memory is promoted to "master" status (this ensures that the
  1031. master environment is properly identified when Windows 95 or later
  1032. high-loads COMMAND.COM).
  1033.  
  1034. Syntax: ENVMASTR [/d] [/c] [/n:progname] [/s] [/x] [/l] [varname=setting]
  1035.  
  1036. If no option switches are given, it applies varname=setting to the master
  1037. command environment only (i.e., the command processor loaded by CONFIG.SYS).
  1038. The option switches, which may be indicated by either a slash or a dash,
  1039. modify its operation as follows:
  1040.  
  1041. /d displays the environment(s) without changing anything (ignores varname).
  1042. /c copies the entire current local environment to target(s) (ignores varname).
  1043. /n names a specific target program's environment to be modified (any level).
  1044. /s targets all subordinate environments that have room.
  1045. /x excludes the master environment (implies /s).
  1046. /l allows lower-case characters in the variable name (default is forced CAPS).
  1047.  
  1048. Note: If the desired value begins with a space, enclose it in quotation marks.
  1049.       For quotation marks within the setting, prefix each with a backslash.
  1050.  
  1051. The order of the option switches is not important, so long as all precede
  1052. the varname=setting (if any). The varname=setting is required except
  1053. when option /c or /d is used, in which case varname=setting is ignored.
  1054. The /c option should be used with caution, as you may be copying some
  1055. settings that you really don't want to have in the target environment,
  1056. especially when you use ENVMASTR from a DOS box under Windows. Windows
  1057. maintains some settings that should not be carried back to the master
  1058. environment from which Windows was launched. When this happens, the /l
  1059. option will allow you to get rid of the "windir" variable, which is in
  1060. lower case and cannot be removed by a SET command. When using /n to name
  1061. a specific target environment, the progname is typically the executable
  1062. file name without any extension.
  1063.  
  1064. For example, to change all COMMAND.COM environments regardless of how
  1065. many shell levels are present, without affecting any other programs,
  1066. use the following command, substituting your variable name and setting:
  1067.  
  1068.    ENVMASTR /N:COMMAND varname=value
  1069.  
  1070. If you were copying the local command environment to all COMMAND.COM
  1071. shell levels, the command would be:
  1072.  
  1073.    ENVMASTR /N:COMMAND /C
  1074.  
  1075. To copy the local environment to the master only, use ENVMASTR /C without
  1076. any /n specification.
  1077.  
  1078. To remove a variable name from the environment, use varname= (without a
  1079. setting), just as you do when using SET.
  1080.  
  1081. To view the usage of only the subordinate COMMAND.COM environment, without
  1082. seeing the master environment, use this command:
  1083.  
  1084.    ENVMASTR /N:COMMAND /X /D
  1085.  
  1086. Note that this will show nothing if the current command environment IS the
  1087. master environment. To see only the master environment, just do this:
  1088.  
  1089.    ENVMASTR /D
  1090.  
  1091. A list of target environments found, and the success or failure of the
  1092. requested setting in each, is sent to STDOUT for display or redirection.
  1093.  
  1094. It returns errorlevel 1 if a subordinate environment could not be changed,
  1095. and errorlevel 2 if the master environment could not be changed.
  1096. Errorlevel 3 indicates a syntax error (no setting attempted).
  1097.  
  1098. Errorlevel 1 or 2 occurs only in the event that the target environment
  1099. is too small to accommodate the requested change. There is no errorlevel
  1100. when a specified program environment is not present, nor when using /d.
  1101.  
  1102. ENVMASTR is very careful to ensure that the change can be accommodated
  1103. within the target environment. It also preserves command line argument
  1104. zero (i.e., the command line without parameters), which follows the
  1105. defined variables; this information is never copied from one environment
  1106. to another but is preserved in its original state. Argument zero will move
  1107. within its home environment, so that it always follows the variable list
  1108. in the correct relative position, and the change will be disallowed if
  1109. there is no room to append argument zero to the list.
  1110.  
  1111.  
  1112.  
  1113. NRTS.EXE
  1114. --------
  1115. This is a utility for testing a user's rights in a specified Novell
  1116. server volume subdirectory. It works with Novell Netware 3.11.
  1117.  
  1118. Syntax: NRTS d:path  (where "path" is a network directory mapped to drive d:)
  1119.  
  1120. If path begins with a backslash, it must be fully qualified RELATIVE TO THE
  1121. NETWORK SERVER VOLUME, which may differ from the path of the mapped DOS logical
  1122. drive if the drive is MAP ROOTed into a subdirectory of the server volume.
  1123.  
  1124. Returns errorlevel 0 for full Read/Write privileges, 1 for Read-Only, 2 for
  1125. neither Read nor Write, 3 for invalid path specification.  Text description
  1126. of rights is returned to STDOUT and may be redirected to NUL or to a file.
  1127.  
  1128. Caution: Netware will not properly reject the path as invalid when only the
  1129. last specified subdirectory level is non-existent.  Instead, it will report
  1130. that you have write privileges in the non-existent directory.  Be sure to spell
  1131. the subdirectory name correctly.  Do not rely upon this program to confirm that
  1132. a desired directory was properly mapped.  It is for rights testing ONLY!
  1133.  
  1134.  
  1135.  
  1136. All of the above utilities were generated with an assembler or a C compiler.
  1137. See README2.TXT for additional included utilities, which were hand-assembled.
  1138.